<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div></div>
    <script>
        var res = document.querySelector('div');
        // 封装函数可以批量设置样式
        function setStyle(){
            arguments;
            console.log(arguments);
            for(var i = 1; i< arguments.length; i++){
                document.querySelector(arguments[0])[arguments[i]];
            }
        }
        setStyle(res,"color","height");
    </script>
</body>
</html>